class A {
public:
    void func() { cout << "A: func()" << endl; }
};

class B : public A { };

class C : public A { };

class D : public B, public C { };

int main() {
    D obj;
    obj.func(); // 编译错误，因为存在二义性
    return 0;
}